package test;

/**
 * @ClassName Car
 * @Description TODO
 * @Author hp
 * @Date 2021/6/15 8:35
 * @Version 1.0
 **/
public class Car {
    private String brand;
    private String color;
    private int price;
    private double length;

    public Car() {

    }

    public Car(String brand, String color, int price, double length) {
        this.brand = brand;
        this.color = color;
        this.price = price;
        this.length = length;
    }

    public void setBrand(String brand){
        this.brand = brand;
    }
    public String getBrand(){
        return this.brand;
    }

    public void setColor(String color){
        this.color = color;
    }
    public String getColor(){
        return this.color;
    }
    public void setPrice(int price){
        this.price = price;
    }
    public int getPrice(){
        return this.price;
    }
    public void setLength(double length){
        this.length = length;
    }
    public double getLength(){
        return this.length;
    }

    public  void run(){
        System.out.println("{" +
                "brand='" + brand + '\'' +
                ", color='" + color + '\'' +
                ", price=" + price +
                ", length=" + length +
                '}'+"汽车在行驶");
    }


}
